home *** CD-ROM | disk | FTP | other *** search
-
-
-
- ggggeeeettttrrrrbbbbuuuuffff((((DDDD3333)))) ggggeeeettttrrrrbbbbuuuuffff((((DDDD3333))))
-
-
-
- NNNNAAAAMMMMEEEE
- _gggg_eeee_tttt_rrrr_bbbb_uuuu_ffff - get a raw buffer header
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_bbbb_uuuu_ffff_...._hhhh_>>>>
- _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_kkkk_mmmm_eeee_mmmm_...._hhhh_>>>>
- _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_dddd_dddd_iiii_...._hhhh_>>>>
-
- _bbbb_uuuu_ffff______tttt _****_gggg_eeee_tttt_rrrr_bbbb_uuuu_ffff_((((_llll_oooo_nnnn_gggg _f_l_a_g_))))_;;;;
-
-
- AAAArrrrgggguuuummmmeeeennnnttttssss
- _f_l_a_g Indicates whether the caller should sleep for free space.
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- _gggg_eeee_tttt_rrrr_bbbb_uuuu_ffff allocates the space for a buffer header (see _bbbb_uuuu_ffff(D4)). If _f_l_a_g
- is set to _KKKK_MMMM______SSSS_LLLL_EEEE_EEEE_PPPP, the caller will sleep if necessary until memory is
- available. If _f_l_a_g is set to _KKKK_MMMM______NNNN_OOOO_SSSS_LLLL_EEEE_EEEE_PPPP, the caller will not sleep, but
- _gggg_eeee_tttt_rrrr_bbbb_uuuu_ffff will return _NNNN_UUUU_LLLL_LLLL if memory is not immediately available.
-
- RRRReeeettttuuuurrrrnnnn VVVVaaaalllluuuueeeessss
- Upon successful completion, _gggg_eeee_tttt_rrrr_bbbb_uuuu_ffff returns a pointer to the allocated
- buffer header. If _KKKK_MMMM______NNNN_OOOO_SSSS_LLLL_EEEE_EEEE_PPPP is specified and sufficient memory is not
- immediately available, _gggg_eeee_tttt_rrrr_bbbb_uuuu_ffff returns a _NNNN_UUUU_LLLL_LLLL pointer.
-
- UUUUSSSSAAAAGGGGEEEE
- _gggg_eeee_tttt_rrrr_bbbb_uuuu_ffff is used when a block driver is performing raw I/O (character
- interface) and needs to set up a buffer header that is not associated
- with a system-provided data buffer. The driver provides its own memory
- for the data buffer.
-
- After allocating the buffer header, the caller must set the _bbbb______iiii_oooo_dddd_oooo_nnnn_eeee
- field to the address of an iodone handler to be invoked when the I/O is
- complete (see _bbbb_iiii_oooo_dddd_oooo_nnnn_eeee(D3)). The caller must also initialize the
- following fields:
-
- _bbbb______ffff_llll_aaaa_gggg_ssss Must be modified to indicate the direction of data
- transfer. Initially, it is set to indicate the transfer is
- from the user's buffer to the kernel. The driver must set
- the _BBBB______RRRR_EEEE_AAAA_DDDD flag if the transfer is from the kernel to the
- user's buffer.
-
- _bbbb______eeee_dddd_eeee_vvvv Must be initialized to the proper device number.
-
- _bbbb______bbbb_cccc_oooo_uuuu_nnnn_tttt Must be set to the number of bytes to transfer.
-
- _bbbb______uuuu_nnnn_...._bbbb______aaaa_dddd_dddd_rrrr Must be set to the virtual address of the caller-supplied
- buffer.
-
- _bbbb______bbbb_llll_kkkk_nnnn_oooo Must be set to the block number to be accessed.
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- ggggeeeettttrrrrbbbbuuuuffff((((DDDD3333)))) ggggeeeettttrrrrbbbbuuuuffff((((DDDD3333))))
-
-
-
- _bbbb______rrrr_eeee_ssss_iiii_dddd Must be set to the same value as _bbbb______bbbb_cccc_oooo_uuuu_nnnn_tttt.
-
- _bbbb______bbbb_uuuu_ffff_ssss_iiii_zzzz_eeee Can be used to remember the size of the data buffer
- associated with the buffer header.
-
- Typically, block drivers do not allocate buffers. The buffer is
- allocated by the kernel and the associated buffer header is used as an
- argument to the driver _ssss_tttt_rrrr_aaaa_tttt_eeee_gggg_yyyy routine. However, to implement some
- special features, such as _iiii_oooo_cccc_tttt_llll(D2) commands that perform I/O, the driver
- may need its own buffer space. The driver can get the buffer space from
- the system by using _gggg_eeee_tttt_eeee_bbbb_llll_kkkk(D3) or _nnnn_gggg_eeee_tttt_eeee_bbbb_llll_kkkk(D3). Or the driver can
- choose to use its own memory for the buffer and only allocate a buffer
- header with _gggg_eeee_tttt_rrrr_bbbb_uuuu_ffff.
-
- LLLLeeeevvvveeeellll
- Base only if _f_l_a_g is set to _KKKK_MMMM______SSSS_LLLL_EEEE_EEEE_PPPP.
-
- Base or Interrupt if _f_l_a_g is set to _KKKK_MMMM______NNNN_OOOO_SSSS_LLLL_EEEE_EEEE_PPPP.
-
- SSSSyyyynnnncccchhhhrrrroooonnnniiiizzzzaaaattttiiiioooonnnn CCCCoooonnnnssssttttrrrraaaaiiiinnnnttttssss
- May sleep if _f_l_a_g is set to _KKKK_MMMM______SSSS_LLLL_EEEE_EEEE_PPPP.
-
- Driver-defined basic locks and read/write locks may be held across calls
- to this function if _f_l_a_g is _KKKK_MMMM______NNNN_OOOO_SSSS_LLLL_EEEE_EEEE_PPPP, but may not be held if _f_l_a_g is
- _KKKK_MMMM______SSSS_LLLL_EEEE_EEEE_PPPP.
-
- Driver-defined sleep locks may be held across calls to this function
- regardless of the value of _f_l_a_g.
-
- RRRREEEEFFFFEEEERRRREEEENNNNCCCCEEEESSSS
- biodone(D3), biowait(D3), buf(D4), freerbuf(D3).
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-